package com.syx.system.Manager;


import com.syx.common.redis.Service.RedisService;
import com.syx.commoncore.Constant.CacheConstant;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class QuestionCacheManager {
    @Resource
    RedisService redisService;

    //从redis中增加指定的数据，头插法，放到第一个
    public void addCache(Long questionId){
        redisService.leftPushForList(CacheConstant.QUESTION_LIST,questionId);

    }

    public void deleteCache(Long questionId){
        redisService.removeForList(CacheConstant.QUESTION_LIST,questionId);

    }


}
